<div class="row-fluid">
    <div class="box span12">
        <div class="box-header" data-original-title>
            <h2>
                <i class="icon-list"></i><span class="break"></span>
                Slider Items
            </h2>
            <div class="box-icon">
                <a href="#" class="btn-minimize"><i class="icon-chevron-up"></i></a>
            </div>
        </div>
        <div class="box-content">
            <p class="text-left">
                <a class="btn btn-success" href="
                <?php
                echo Yii::app()->createUrl("slider/add", array(
                ));
                ?>">
                    <i class="icon-plus-sign"></i> Add Item
                </a>
            </p>
            <?php if (Yii::app()->user->hasFlash('success')): ?>
                <div class="alert alert-success">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>All done!</strong> <?php echo Yii::app()->user->getFlash('success'); ?>
                </div>
            <?php endif; ?>
            <?php if (Yii::app()->user->hasFlash('error')): ?>
                <div class="alert alert-success">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>All done!</strong> <?php echo Yii::app()->user->getFlash('error'); ?>
                </div>
            <?php endif; ?>
            <div class="table-responsive"> 
                <table class="table table-bordered table-striped table-condensed">
                    <thead>
                        <tr>
                            <th>Service</th>
                            <th>Images</th>
                            <th class="text-right">Rank</th>
                            <th class="text-right">Status</th>
                            <th class="text-center"></th>                                          
                        </tr>
                    </thead>
                    <tbody>
                        <?php if ($model): ?>
                            <?php foreach ($model as $item): ?>
                                <tr>
                                    <td>
                                        <?php echo $item->service->s_name ?>
                                    </td>
                                    <td class="text-center">
                                        <img width="60" height="60" src="<?php echo $item->publicImages ?>" />
                                    </td>
                                    <td class="center text-center">
                                        <?php echo $item->rank ?>
                                    </td>
                                    <td class="center text-right">
                                        <?php echo $item->statusLabel ?>
                                    </td>
                                    <td class="center">
                                        <a href="<?php
                                        echo Yii::app()->createUrl('slider/edit', array(
                                            'pk' => $item->id,
                                        ));
                                        ?>" class="btn btn-info">
                                            <i class="icon-edit "></i>                                            
                                        </a>
                                        <a class="btn btn-danger" 
                                           href="<?php
                                           echo Yii::app()->createUrl('slider/delete', array(
                                               'pk' => $item->id,
                                           ));
                                           ?>">
                                            <i class="icon-trash "></i> 
                                        </a>
                                    </td>                                       
                                </tr>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <div class="pagination pagination-centered">
                <?php
                $this->widget('application.widgets.MyLinkPager', array(
                    'pages'                => $pages,
                    'header'               => '',
                    'maxButtonCount'       => 5,
                    'nextPageLabel'        => '&raquo;',
                    'firstPageLabel'       => '←',
                    'lastPageLabel'        => '→',
                    'prevPageLabel'        => '&laquo;',
                    'selectedPageCssClass' => 'active',
                    'htmlOptions'          => array(
                        'class' => ''
                    )
                ))
                ?>
            </div>
        </div>
    </div>
</div>